Release 10.1A: OpenEdge Application Server:
Developing WebSpeed Applications
Utilizing debugging in your application
Any WebSpeed application has access to the WebSpeed global variable debug-options. You can turn on debugging selectively by setting this variable to a comma-separated list of options. As long as your SpeedScript Web object includes
{src/web/method/cgidefs.i}(this is true by default), you have access to this variable.The options you can set include
cookie,http,all, among others. The complete list of options resides ininstall-path/src/web/support/prinval.p, the WebSpeed procedure that outputs the debugging information for Web pages.The following code tests if
“all”debugging is enabled:
The
CAN-DO()function compares the second argument with the first, which would be a comma separated list of options If“all”is found in this list, it evaluates toTRUEand executes the SpeedScript in the block.The following code tests for a custom debugging option called
“login”as well as“all”:
If you specified
debug=login,debug=all,debug=login, oradmin(to name a few), this section of code is executed.If you use your own debugging options, make sure your application ignores all options it does not understand. Never test the value of the debug-options variable for equality. Always test using the
CAN-DO()function to see if your custom options are among the listed ones.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |